/*
 * XML Type:  PaymentTransactionResponse
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.PaymentTransactionResponse
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML PaymentTransactionResponse(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class PaymentTransactionResponseImpl extends net.ofx.types.x2003.x04.impl.AbstractTransactionResponseImpl implements net.ofx.types.x2003.x04.PaymentTransactionResponse
{
    
    public PaymentTransactionResponseImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName PMTRS$0 = 
        new javax.xml.namespace.QName("", "PMTRS");
    private static final javax.xml.namespace.QName PMTMODRS$2 = 
        new javax.xml.namespace.QName("", "PMTMODRS");
    private static final javax.xml.namespace.QName PMTCANCRS$4 = 
        new javax.xml.namespace.QName("", "PMTCANCRS");
    
    
    /**
     * Gets the "PMTRS" element
     */
    public net.ofx.types.x2003.x04.PaymentResponse getPMTRS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PaymentResponse target = null;
            target = (net.ofx.types.x2003.x04.PaymentResponse)get_store().find_element_user(PMTRS$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "PMTRS" element
     */
    public boolean isSetPMTRS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(PMTRS$0) != 0;
        }
    }
    
    /**
     * Sets the "PMTRS" element
     */
    public void setPMTRS(net.ofx.types.x2003.x04.PaymentResponse pmtrs)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PaymentResponse target = null;
            target = (net.ofx.types.x2003.x04.PaymentResponse)get_store().find_element_user(PMTRS$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.PaymentResponse)get_store().add_element_user(PMTRS$0);
            }
            target.set(pmtrs);
        }
    }
    
    /**
     * Appends and returns a new empty "PMTRS" element
     */
    public net.ofx.types.x2003.x04.PaymentResponse addNewPMTRS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PaymentResponse target = null;
            target = (net.ofx.types.x2003.x04.PaymentResponse)get_store().add_element_user(PMTRS$0);
            return target;
        }
    }
    
    /**
     * Unsets the "PMTRS" element
     */
    public void unsetPMTRS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(PMTRS$0, 0);
        }
    }
    
    /**
     * Gets the "PMTMODRS" element
     */
    public net.ofx.types.x2003.x04.PaymentModResponse getPMTMODRS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PaymentModResponse target = null;
            target = (net.ofx.types.x2003.x04.PaymentModResponse)get_store().find_element_user(PMTMODRS$2, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "PMTMODRS" element
     */
    public boolean isSetPMTMODRS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(PMTMODRS$2) != 0;
        }
    }
    
    /**
     * Sets the "PMTMODRS" element
     */
    public void setPMTMODRS(net.ofx.types.x2003.x04.PaymentModResponse pmtmodrs)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PaymentModResponse target = null;
            target = (net.ofx.types.x2003.x04.PaymentModResponse)get_store().find_element_user(PMTMODRS$2, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.PaymentModResponse)get_store().add_element_user(PMTMODRS$2);
            }
            target.set(pmtmodrs);
        }
    }
    
    /**
     * Appends and returns a new empty "PMTMODRS" element
     */
    public net.ofx.types.x2003.x04.PaymentModResponse addNewPMTMODRS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PaymentModResponse target = null;
            target = (net.ofx.types.x2003.x04.PaymentModResponse)get_store().add_element_user(PMTMODRS$2);
            return target;
        }
    }
    
    /**
     * Unsets the "PMTMODRS" element
     */
    public void unsetPMTMODRS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(PMTMODRS$2, 0);
        }
    }
    
    /**
     * Gets the "PMTCANCRS" element
     */
    public net.ofx.types.x2003.x04.PaymentCancelResponse getPMTCANCRS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PaymentCancelResponse target = null;
            target = (net.ofx.types.x2003.x04.PaymentCancelResponse)get_store().find_element_user(PMTCANCRS$4, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "PMTCANCRS" element
     */
    public boolean isSetPMTCANCRS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(PMTCANCRS$4) != 0;
        }
    }
    
    /**
     * Sets the "PMTCANCRS" element
     */
    public void setPMTCANCRS(net.ofx.types.x2003.x04.PaymentCancelResponse pmtcancrs)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PaymentCancelResponse target = null;
            target = (net.ofx.types.x2003.x04.PaymentCancelResponse)get_store().find_element_user(PMTCANCRS$4, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.PaymentCancelResponse)get_store().add_element_user(PMTCANCRS$4);
            }
            target.set(pmtcancrs);
        }
    }
    
    /**
     * Appends and returns a new empty "PMTCANCRS" element
     */
    public net.ofx.types.x2003.x04.PaymentCancelResponse addNewPMTCANCRS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PaymentCancelResponse target = null;
            target = (net.ofx.types.x2003.x04.PaymentCancelResponse)get_store().add_element_user(PMTCANCRS$4);
            return target;
        }
    }
    
    /**
     * Unsets the "PMTCANCRS" element
     */
    public void unsetPMTCANCRS()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(PMTCANCRS$4, 0);
        }
    }
}
